
const TokenKey = 'bufan-token'

export function getToken() {
  return window.localStorage.getItem(TokenKey)
}

export function removeToken() {
  return window.localStorage.removeItem(TokenKey)
}

export function setToken(token) {
  console.log(token,2222)
  return window.localStorage.setItem(TokenKey, token)
}

export function setInfo(item) {
  return window.localStorage.setItem('userInfo', JSON.stringify(item))
}
export function getInfo() {
  return JSON.parse(window.localStorage.getItem('userInfo')) 
}

